<?php


namespace app\api\controller;


use app\common\lib\phpqrcode\QRcode;

class Qcode extends ApiBase
{
    /**
     * 生成二维码
     */
    public function index() {
        $url = urldecode(input("param.data", ""));
        if(substr($url, 0, 6) == "weixin"){
            QRcode::png($url);
        }else{
            header('HTTP/1.1 404 Not Found');
        }
    }
}